package annotation05;


import annotation03.Color;

@MyAnnotation("张三")
public class Person {

    //@MyAnnotation("李四")//由于指定了@Target,只能用在类接口以及方法上,用在字段上直接编译报错
    private int age;

    @MyAnnotation(value="老王",color = Color.GREEN)
    public int getAge() {
        return age;
    }


    public void setAge(int age) {
        this.age = age;
    }
}
